home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / machack / Hacks97 / WarriorsProgress.sit / Warrior’s Progress / source code / Source / Libraries / Files / FileType.h < prev    next >
Text File  |  1997-06-28  |  961b  |  40 lines

  1. // FileType.h
  2.  
  3. #ifndef FileType_h
  4. #define FileType_h
  5.  
  6. #ifndef Integers_h
  7. #include "Integers.h"
  8. #endif
  9.  
  10. class FileType
  11.   {
  12.     private:
  13.         uint32 type;
  14.     
  15.         FileType( uint32 value )
  16.           : type( value )
  17.           {}
  18.         
  19.     public:
  20.         static FileType Make( uint32 value )    { return value; }
  21.     
  22.         uint32 Type() const                            { return type; }
  23.         
  24.         bool operator==( FileType f ) const        { return type == f.type; }
  25.         bool operator!=( FileType f ) const        { return type != f.type; }
  26.         
  27.         static FileType Application()                { return 'APPL'; }
  28.         static FileType Text()                        { return 'TEXT'; }
  29.         static FileType ReadOnlyText()            { return 'ttro'; }
  30.         static FileType Picture()                    { return 'PICT'; }
  31.  
  32.         static FileType FontResource()            { return 'ffil'; }
  33.         static FileType KeyboardResource()        { return 'kfil'; }
  34.         static FileType ScriptResource()            { return 'ifil'; }
  35.         static FileType SoundResource()            { return 'sfil'; }
  36.         static FileType TrueTypeFontResource()    { return 'tfil'; }
  37.   };
  38.  
  39. #endif
  40.